;;; packages.el --- ctrl layer packages file for Spacemacs.

(defconst ctrl-packages
  '(youdao-dictionary
    company))

(defun ctrl/init-youdao-dictionary()
  (use-package youdao-dictionary
    :defer t
    :init
    (spacemacs/set-leader-keys "oy" 'youdao-dictionary-search-at-point+)
    (spacemacs/set-leader-keys "os" 'youdao-dictionary-play-voice-at-point)))

(defun ctrl/post-init-company()
  (spacemacs|add-company-backends :backends company-anaconda :modes python-mode)
  (setq company-minimum-prefix-length 1))

;;; packages.el ends here
